/*------------------------------------------------------
                hou_elearningGEN beta v1.0
Author: xtrung.net@gmail.com
Write On: 04/27/2008
Create On:4/13/2012 11:22:46 AM
------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace hou_elearning.Entity
{
    public class DanhmuctainguyenEntity
    {
        public DanhmuctainguyenEntity()
        {
			m_pk_idanhmuctainguyenid=0;
			m_stendanhmuctainguyen="";
			m_stenthumuc="";
        }
		private Int16 m_pk_idanhmuctainguyenid;
		public Int16 PK_iDanhmuctainguyenID
		{
			get { return m_pk_idanhmuctainguyenid ; }
			set { m_pk_idanhmuctainguyenid = value; }
		}
		private String m_stendanhmuctainguyen;
		public String sTendanhmuctainguyen
		{
			get { return m_stendanhmuctainguyen ; }
			set { m_stendanhmuctainguyen = value; }
		}
		private String m_stenthumuc;
		public String sTenthumuc
		{
			get { return m_stenthumuc ; }
			set { m_stenthumuc = value; }
		}

        #region Comparison
        public static List<DanhmuctainguyenEntity> Sort(List<DanhmuctainguyenEntity> list, String SortExpression, String SortDirection)
        {
            string strComparisonAttrb="COMPARISON_"+SortExpression;
            PropertyInfo propInfo= typeof(DanhmuctainguyenEntity).GetProperty(strComparisonAttrb);
            if (propInfo != null)
            {
                list.Sort(propInfo.GetGetMethod().Invoke(null,null) as Comparison<DanhmuctainguyenEntity>);
                if (SortDirection == "DESC")
                    list.Reverse();
            }
            return list;
        }
        
		public static Comparison<DanhmuctainguyenEntity> COMPARISON_PK_iDanhmuctainguyenID
		{
			get
			{
				return delegate(DanhmuctainguyenEntity entity,DanhmuctainguyenEntity other)
				{
					return entity.PK_iDanhmuctainguyenID.CompareTo(other.PK_iDanhmuctainguyenID);
				};
			}
		}
		public static Comparison<DanhmuctainguyenEntity> COMPARISON_sTendanhmuctainguyen
		{
			get
			{
				return delegate(DanhmuctainguyenEntity entity,DanhmuctainguyenEntity other)
				{
					return entity.sTendanhmuctainguyen.CompareTo(other.sTendanhmuctainguyen);
				};
			}
		}
		public static Comparison<DanhmuctainguyenEntity> COMPARISON_sTenthumuc
		{
			get
			{
				return delegate(DanhmuctainguyenEntity entity,DanhmuctainguyenEntity other)
				{
					return entity.sTenthumuc.CompareTo(other.sTenthumuc);
				};
			}
		}
        #endregion
    }
}
